In [1]:
#librerias
import numpy as np
import pandas as pd
In [2]:
df = pd.DataFrame({'A':[1,2,np.nan],
'B':[5,np.nan,np.nan],
'C':[1,2,3]})
In [3]:
df
Out[3]:
In [4]:
df.dropna()
Out[4]:
In [5]:
df.dropna(axis=1)
Out[5]:
In [6]:
df.dropna(thresh=2)
Out[6]:
In [7]:
df.fillna(value='FILL VALUE')
Out[7]:
In [8]:
df['A'].fillna(value=df['A'].mean())
Out[8]: